package com.yanqu.road.server.cmd.activity.dafuweng.cross;

import com.yanqu.road.pb.monopoly.CrossMonopolyProto;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.command.Command;
import com.yanqu.road.server.manger.activity.dafuweng.DaFuWengMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.GameProtocol;
import io.netty.channel.ChannelHandlerContext;

@Cmd(code = GameProtocol.S_DA_FU_WENG_CROSS_UNION_COLLECTION_TASK,desc = "")
public class DfwAddCollectionCmd implements Command {
    @Override
    public void execute(ChannelHandlerContext ctx, YanQuMessage packet) throws Exception {
        CrossMonopolyProto.CrossDfwAddUserCollectTaskMsg msg = CrossMonopolyProto.CrossDfwAddUserCollectTaskMsg.parseFrom(packet.getBytes());
        int activityId = msg.getActivityId();
        String unionId = msg.getUnionId();
        int taskId = msg.getTaskId();
        int addTimes = msg.getAddTimes();
        DaFuWengMgr.addCollection(activityId, unionId, taskId, addTimes);
    }
}
